home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
examples
/
chap04
/
Viewpoint.wrl
< prev
next >
Wrap
Text File
|
1996-10-14
|
718b
|
34 lines
#VRML V2.0 utf8
DEF FRONT_VIEW Viewpoint{
position 0 1 10
description "Front view"
}
DEF SIDE_VIEW Viewpoint{
position 10 1 0
orientation 0 1 0 1.57
description "Side view"
}
Inline{url "CarBody.wrl"}
Transform{
translation 0 4 0
children[
Shape{geometry Sphere{radius 0.5}},
DEF TOUCH TouchSensor{}
]
}
DEF SCRIPT Script{
url "Viewpoint.class"
eventIn SFTime touched
eventOut SFBool bindFrontView
eventOut SFBool bindSideView
}
ROUTE TOUCH.touchTime TO SCRIPT.touched
ROUTE SCRIPT.bindFrontView TO FRONT_VIEW.set_bind
ROUTE SCRIPT.bindSideView TO SIDE_VIEW.set_bind